package cn.ucai.day0906;

import java.util.Arrays;
import java.util.Random;

/*
 * 随机数对象Random
 * 输出格式[1,2,3,4,5,6]
 * Arrays
 */
public class TestArray3 {

	public static void main(String[] args) {
		int arr[]=new int[10];
		Random ran=new Random();
		for(int i=0;i<arr.length;i++){
			//前闭后开区间
			arr[i]=ran.nextInt(101);
			
			if(i==0)System.out.print("["+arr[i]+",");
			else if (i==arr.length-1)System.out.println(arr[i]+"]");
			else System.out.print(arr[i]+",");
			}
		
		
		System.out.println(Arrays.toString(arr));
		//默认初始化，int默认值为0，char为\u0000，String为null
		
		
		
	}

}
